/**
 * 
 */
package com.iwords.service.ao.impl;

import com.iwords.service.WordService;
import java.util.List;
import java.util.Map;

import javax.ejb.EJB;
import javax.ejb.Stateless;

import com.iwords.service.WordServiceLocal;
import com.iwords.service.object.HotSentencesEntity;
import com.iwords.service.object.SysLibWordsEntity;
import com.iwords.service.persistence.HotSentencesPersistence;
import com.iwords.service.persistence.SysLibWordsPersistence;

/**
 * @author       BOLIN.HBC 
 * @time         2011-3-19    
 * @description  单词的SERVICE-IMPL       
 */
@Stateless
public class WordServiceImpl implements WordServiceLocal,WordService {

	@EJB
	SysLibWordsPersistence sysLibWordsPersistence;

	@EJB
	HotSentencesPersistence hotSentencesPersistence;

	public List<SysLibWordsEntity> findWordsBySysLibId(Long sysLibId) {
		return sysLibWordsPersistence.findWordsBySysLibId(sysLibId);
	}

	public SysLibWordsEntity findWordByWordId(Long wordId) {
		return sysLibWordsPersistence.findWordByWordId(wordId);
	}

	public List<HotSentencesEntity> getHotListByWordId(Long wordid) {
		return hotSentencesPersistence.getHotListByWordId(wordid);
	}

	public void updateWords(SysLibWordsEntity word) {
		sysLibWordsPersistence.updateWords(word);
	}

	public Long getAllManagerWordsCount() {
		return sysLibWordsPersistence.getAllManagerWordsCount();
	}

	public List<SysLibWordsEntity> getAllManagerWords(String sZiMu, int page) {
		return sysLibWordsPersistence.getAllManagerWords(sZiMu, page);
	}

	@Override
	public Map<String, Object> getNextWord(Long wordid, int page, boolean isFirst) {
		return sysLibWordsPersistence.getNextWord(wordid, page, isFirst);
	}
  
        

}
